using System.Drawing;
using System.Windows;
using System.Windows.Controls;

	public partial class FontDialog
	{
		
		public string Res = "Cancel";
		public FontFamily font;
		
        public FontDialog()
        {
            InitializeComponent();
        }
		public void OKButton_Click(System.Object sender, RoutedEventArgs e)
		{
			font = (FontFamily)FontListBox.SelectedItem;
			Res = "OK";
			Close();
		}
		
		public void FontListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
		{
			if (FontListBox.SelectedItem != null)
			{
				OKButton.IsEnabled = true;
			}
			else
			{
				OKButton.IsEnabled = false;
			}
		}
		
		public void FontDialog_Loaded(object sender, RoutedEventArgs e)
		{
			if (MS.WindowsAPICodePack.Internal.CoreHelpers.RunningOnVista || MS.WindowsAPICodePack.Internal.CoreHelpers.RunningOnWin7)
			{
				AppHelper.ExtendGlassFrame(this, new Thickness(-1, -1, -1, -1));
			}
		}
	}

